<?php

class Verify {

    public function checkUsername($username) {
	$S_key = array("\\", '&', ' ', "'", '"', '/', '*', ',', '<', '>', "\r", "\t", "\n", '#', '%', '?', '　');
	foreach ($S_key as $value) {
	    if (strpos($username, $value) !== false) {
		return FALSE;
	    }
	}
	return $username;
    }

    public function checkEmail($email) {
	if (preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/i", $email)) {
	    return $email;
	}
	return FALSE;
    }

}

?>
